home *** CD-ROM | disk | FTP | other *** search
- Path: colossus.holonet.net!russell
- From: russell@news.mdli.com (Russell Blackadar)
- Newsgroups: comp.lang.c++
- Subject: Re: type-casting in multi-inheritance
- Date: 13 Feb 1996 02:04:06 GMT
- Organization: HoloNet National Internet Access System: 510-704-1058/modem
- Message-ID: <4forim$iv8@colossus.holonet.net>
- References: <DMn7Ix.G9@Virginia.EDU>
- NNTP-Posting-Host: jubal.mdli.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Gregory Carl Lewin (gcl8a@Virginia.EDU) wrote:
- : I am a bit fuzzy about casting from pointers to derived objects
- : to base classes...
-
- : class Base1 {};
- : class Base2 {};
- : class Derived12 : public Base1, Base2 {};
- ^^^^^
- should be public Base2
- ...
-
- : Because Derived 12 is publicly derived from Base1 and Base2...
-
- Alas, no -- you derived it publicly only from Base1.
- --
- Russell Blackadar, russell@mdli.com
-